<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script type="text/javascript">
	function l_sys_clear(){
		$("#l_sys_name").val("");
		$("#pagerForm").submit();
	}
</script>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="roleManage/toSysLookUp.do" method="post">
    	<input type="hidden" name="pageCurrent" value="${resultDto.pageCurrent}">
        <input type="hidden" name="pageSize" value="${resultDto.pageSize}">
        <div class="bjui-searchBar">
            <label>名称：</label>
            <select name="systemId" id="l_sys_systemId" data-toggle="selectpicker" data-width="150">
            	<option value="">=====请选择====</option>
                <c:forEach items="${systems }" var="v">
              	  <option value="${v.value}" <c:if test="${systemId eq v.value }">selected</c:if> >${v.lable}</option>
                </c:forEach>
            </select>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>&nbsp;
            <div class="pull-right">
                <input type="checkbox" name="lookupType" value="1" data-toggle="icheck" data-label="追加" checked>
                <button type="button" class="btn-blue" data-toggle="lookupback" data-lookupid="systemAccessIds" data-warn="请至少选择一个系统" data-icon="check-square-o">选择选中</button>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table data-toggle="tablefixed" data-width="100%">
        <thead>
            <tr>
                <th data-order-field="systemAccessId">No.</th>
                <th data-order-field="systemId">系统名称</th>
                <th data-order-field="accessUrl">接入地址</th>
                <th width="28"><input type="checkbox" class="checkboxCtrl" data-group="systemAccessIds" data-toggle="icheck"></th>
                <th width="74">操作</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <c:forEach items="${resultDto.list}" var="var" varStatus="st">
	            	<tr>
		                <td>${st.index + 1 }</td>
		                <td>${var.systemName }</td>
		                <td>${var.accessUrl }</td>
		                <td><input type="checkbox"
		                 name="systemAccessIds"  data-toggle="icheck" value="{systemAccessId:'${var.systemAccessId }', systemName:'${var.systemName }'}"></td>
		                <td>
		                    <a href="javascript:;" data-toggle="lookupback" data-args="{systemAccessId:'${var.systemAccessId }', systemName:'${var.systemName }'}" class="btn btn-blue" title="选择本项" data-icon="check">选择</a>
		                </td>
		            </tr>
                </c:forEach>
            </tr>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="20">20</option>
                <option value="30">30</option>
                <option value="40">40</option>
            </select>
        </div>
        <span>&nbsp;条，共${resultDto.total }条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="${resultDto.total }" data-page-size="${resultDto.pageSize }" data-page-current="${resultDto.pageCurrent }">
    </div>
</div>